﻿package mortal.game.view.blackMarket
{
    import Message.DB.Tables.*;
    import com.gengine.resource.*;
    import flash.utils.*;
    import mortal.game.view.common.*;

    public class BlackMarketConfig extends Object
    {
        private var _blackMarketItemDic:Dictionary;
        private static var _instance:BlackMarketConfig;

        public function BlackMarketConfig()
        {
            this._blackMarketItemDic = new Dictionary();
            this.init();
            return;
        }// end function

        private function init() : void
        {
            var _loc_1:* = ConfigManager.instance.getJSONByFileName("t_blackmarket_config.json");
            this.write(_loc_1);
            return;
        }// end function

        private function write(param1:Object) : void
        {
            var _loc_2:TBlackmarketConfig = null;
            var _loc_3:Object = null;
            for each (_loc_3 in param1)
            {
                
                _loc_2 = new TBlackmarketConfig();
                ClassTypesUtil.copyValue(_loc_2, _loc_3);
                this._blackMarketItemDic[_loc_2.itemCode] = _loc_2;
            }
            return;
        }// end function

        public function getBlackMarketConfig(param1:int) : TBlackmarketConfig
        {
            return this._blackMarketItemDic[param1];
        }// end function

        public static function get instance() : BlackMarketConfig
        {
            if (_instance == null)
            {
                _instance = new BlackMarketConfig;
            }
            return _instance;
        }// end function

    }
}
